<!-- 完成/退款-->
<template>
	<view>
		<!-- //列表 -->
		<view class="pay_list" v-for="(item,index) in list" :key='index'>
			<view class="pay_list_top">
				<view class="pay_text1">订单编号:CD20051200001</view>
				<view class="pay_text2">已完成</view>
			</view>
			<view class="pay_list_center">
				<view class="pay_list_pic">
					<image src="/static/timg.jpg" mode=""></image>
				</view>
				<view class="pay_list_cont">
					<view class="cont_text1">欧莱雅植物洗护套装</view>
					<view class="cont_text2">
						<view>数量：洗发水*1瓶+护发素*1瓶 </view>
						<view style="font-size: 24rpx;font-family: PingFang SC;font-weight: 400;color: #000000;">￥365</view>
					</view>
					<view class="cont_text3">
						<view>含量：500ml+500ml</view>
						<view>x1</view>
					</view>
				</view>
			</view>
			<view class="pay_list_bottom">
				<view class="bottom_text1">
					<view class="times"></view>
					<view class="count">共1件 合计：￥365 </view>
				</view>
				<view class="bottom_text2">
					<view class="bottom_btn1" @click="dels">
						删除
					</view>
					<view class="bottom_btn2" @click="refunt(index)">
						退款
					</view>
				</view>
			</view>
		</view>
		
		<!-- //退款弹出层 -->
		<uni-popup type="bottom" ref='refun'>
			<view class="pop_refun">
				<view class="top1">
					<view class="top1_title">退款进度</view>
					<view class="top1_text1">
						退款进行中/完成
					</view>
					<view class="top1_text2">
						<text class="top1_text3">订单编号：</text>
						<text class="top1_text4">CD20051200001 </text>
					</view>
					<view class="top1_text2">
						<text class="top1_text3">创建时间：</text>
						<text class="top1_text4">2020-04-22 12:04:22</text>
					</view>
					<view class="top1_text2">
						<text class="top1_text3">退款金额：</text>
						<text class="top1_text4">¥365 元 </text>
						<text style="font-size: 22rpx;font-family: PingFang SC;font-weight: 500;color: #414141;">（1-15个工作日到账）</text>
					</view>
					<view style="display: flex;">
						<view style="margin-right: 5rpx;">
							<text class="icon iconfont" style="font-size: 22rpx;">&#xe609;</text>
						</view>
						<view>
							<text style="font-size: 22rpx;font-family: PingFang;font-weight: 500;color: #8E8E8E;line-height: 20rpx;"> 退款将退还您实际支付的金额，活动优惠部分概不退还，M币或积分兑等资产原路返还。</text>
						</view>
						
					</view>
				</view>
				<!-- //退款进度轴 -->
				<view class="step_axis">
					<u-time-line>
						
							
							<u-time-line-item>
								<!-- 此处没有自定义左边的内容，会默认显示一个点 -->
								<template v-slot:content>
									<view>
										<view class="u-order-desc">您的退款众美已经受理完成，到账周期可查看退款明细。</view>
										<view class="u-order-time">2020-04-22 12:04:22</view>
									</view>
								</template>
							</u-time-line-item>
							<u-time-line-item>
								<!-- 此处没有自定义左边的内容，会默认显示一个点 -->
								<template v-slot:content>
									<view>
										<view class="u-order-desc">您的订单拦截成功，正在进行退款审核，请耐心等待。</view>
										<view class="u-order-time">2020-04-22 12:04:22</view>
									</view>
								</template>
							</u-time-line-item>
							<u-time-line-item>
								<!-- 此处没有自定义左边的内容，会默认显示一个点 -->
								<template v-slot:content>
									<view>
										<view class="u-order-desc">您的订单退款成功。</view>
										<view class="u-order-time">2020-04-22 12:04:22</view>
									</view>
								</template>
							</u-time-line-item>
					</u-time-line>
				</view>
			</view>
		</uni-popup>
		
	</view>
</template>

<script>
	export default {
		data(){
			return{
				list_pay:[{
					order_code:"CD20051200001",//订单编号
					status:'待付款',//订单状态
				}],
				list:3
			}
		},
		methods:{
			dels(index){
				uni.showModal({
					title:'确认删除此订单？',
					content:'删除后将无法显示此条信息',
					success: (res) => {
						if (res.confirm) {
							if(this.list<=1){
								return
							}else{
								this.list--
							}
								
						            console.log('用户点击确定');
						        } else if (res.cancel) {
						            console.log('用户点击取消');
						        }
					}
				})
			},
			//退款
			refunt(index){
				this.$refs.refun.open()
			}
		}
	}
</script>

<style scoped lang="less">
	.pay_list{
		padding: 22rpx 25rpx;
		background: white;		
		box-shadow: 0rpx 2rpx 7rpx 0px rgba(113, 113, 113, 0.26);
		margin-top: 10rpx;
		.pay_list_top{
			display: flex;
			justify-content: space-between;
			border-bottom: 1rpx solid #E1E1E1;
			padding-bottom: 21rpx;
			.pay_text1{				
				font-size: 22rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #656565;
			}
			.pay_text2{
				
				font-size: 22rpx;
				font-family: PingFang;
				font-weight: 500;
				color: #282828;
			}
			
		}
		.pay_list_center{
			display: flex;
			margin-top: 20rpx;
			border-bottom: 1rpx solid #E1E1E1;
			padding-bottom: 20rpx;
			.pay_list_pic{
				width: 130rpx;
				height: 130rpx;
				margin-right: 28rpx;
				image{
					width: 100%;
					height: 100%;
				}
			}
			.pay_list_cont{
				flex: auto;
				align-items: center;
				.cont_text1{
					line-height: 34rpx;
					font-size: 28rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #000000;
				}
				.cont_text2{
					display: flex;
					justify-content: space-between;
					font-size: 20rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #858585;
					line-height: 34rpx;
				}
				.cont_text3{
					display: flex;
					justify-content: space-between;
					font-size: 20rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #858585;
					line-height: 34rpx;
				}
			}
		}
		.pay_list_bottom{
			margin-top: 25rpx;
			.bottom_text1{
				display: flex;
				justify-content: space-between;
				.times{
					
					font-size: 22rpx;
					font-family: PingFang;
					font-weight: 500;
					color: #8E8E8E;
				}
				.count{
					
					font-size: 22rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #000000;
				}
			}
			.bottom_text2{
				display: flex;
				justify-content: flex-end;
				align-items: center;
				margin-top: 20rpx;
				.bottom_btn1{
					width: 145rpx;
					height: 58rpx;
					border: 1rpx solid #979797;
					border-radius: 4rpx;					
					font-size: 26rpx;
					font-family: PingFang;
					font-weight: 500;
					color: #414141;
					margin-right: 49rpx;
					text-align: center;
					line-height: 58rpx;
				}
				.bottom_btn2{
					width: 145rpx;
					height: 58rpx;
					border: 1rpx solid #979797;
					border-radius: 4rpx;					
					font-size: 26rpx;
					font-family: PingFang;
					font-weight: 500;
					color: #414141;
					text-align: center;
					line-height: 58rpx;
				
				}
			}
		}
	}
	//弹出层
	.pop_refun{
		background: #EEEEEE;
		// height: 864rpx;
		.top1{
			padding: 29rpx 25rpx;
			background: white;
			.top1_title{
				text-align: center;				
				font-size: 30rpx;
				font-family: PingFang;
				font-weight: bold;
				color: #282828;
				line-height: 30rpx;
			}
			.top1_text1{				
				font-size: 26rpx;
				font-family: PingFang;
				font-weight: bold;
				color: #00C6C2;
				margin-top: 10rpx;
			}
			.top1_text2{
				.top1_text3{
					margin-right: 40rpx;
					font-size: 22rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: #8E8E8E;
					line-height: 36rpx;
				}
				.top1_text4{
					
					font-size: 22rpx;
					font-family: PingFang SC;
					font-weight: bold;
					color: #000000;
					line-height: 36rpx;
				}
			}
		}
		//进度轴 
		.step_axis{
			background: white;
			margin-top: 10rpx;
			padding: 29rpx 25rpx;
			.u-order-desc {
					color: rgb(150, 150, 150);
					font-size: 28rpx;
					margin-bottom: 6rpx;
				}
				
				.u-order-time {
					color: rgb(200, 200, 200);
					font-size: 26rpx;
				}
		}
	
	}
</style>
